package com.niodata.dp.log.viewer;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

public interface ViewerSession {

  void open() throws IOException;

  void close() throws IOException;

  boolean isClosed();

  void clear();

  Host getHost();

  List<String> readLines(int count);

  /**
   * read lines with max milliseconds.
   *
   * @param count max lines
   * @param waitTime max wait time in milliseconds
   * @return data list
   */
  List<String> readLines(int count, int waitTime);

  String readLine();

  /**
   * read line with max wait time in milliseconds.
   *
   * @param waitTime milliseconds
   * @return data
   */
  String readLine(int waitTime);


  boolean hasMore();

  void bindStreamToOutput(PrintWriter streamWriter);

}
